﻿#include "common.h"
#include <QTime>
#include <QCoreApplication>

Common::Common() {

}

bool Common::sleep(unsigned int msec) {
    QTime dieTime = QTime::currentTime().addMSecs(msec);
    while (QTime::currentTime() < dieTime)
        QCoreApplication::processEvents(QEventLoop::AllEvents, 100);
    return true;
}
